package com.gisocn.onemap.widget;

import android.content.Context;
import android.content.DialogInterface;
import android.util.Log;
import androidx.appcompat.app.AlertDialog;
import com.gisocn.onemap.sgzx.R;

/* loaded from: classes2.dex */
public class CustomDialogShow {
    public static void showDialog(Context context, String str) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle("提示：");
        builder.setMessage(str);
        builder.setIcon(R.mipmap.ic_launcher);
        builder.setCancelable(true);
        builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { // from class: com.gisocn.onemap.widget.CustomDialogShow.1
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                dialogInterface.dismiss();
            }
        });
        builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { // from class: com.gisocn.onemap.widget.CustomDialogShow.2
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                dialogInterface.dismiss();
            }
        });
        builder.setNeutralButton("保密", new DialogInterface.OnClickListener() { // from class: com.gisocn.onemap.widget.CustomDialogShow.3
            @Override // android.content.DialogInterface.OnClickListener
            public void onClick(DialogInterface dialogInterface, int i) {
                dialogInterface.dismiss();
            }
        });
        AlertDialog create = builder.create();
        create.setOnShowListener(new DialogInterface.OnShowListener() { // from class: com.gisocn.onemap.widget.CustomDialogShow.4
            @Override // android.content.DialogInterface.OnShowListener
            public void onShow(DialogInterface dialogInterface) {
                Log.e("fang", "对话框显示了");
            }
        });
        create.setOnCancelListener(new DialogInterface.OnCancelListener() { // from class: com.gisocn.onemap.widget.CustomDialogShow.5
            @Override // android.content.DialogInterface.OnCancelListener
            public void onCancel(DialogInterface dialogInterface) {
                Log.e("fang", "对话框消失了");
            }
        });
        create.show();
    }
}
